﻿using System;
using System.ComponentModel.DataAnnotations;

namespace LJSheng.Data
{
    /// <summary>
    /// 用户表
    /// </summary>
    public class LUser
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public Guid gid { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        public DateTime addtime { get; set; }

        /// <summary>
        /// 推荐人GID
        /// </summary>
        public Guid? usergid { get; set; }

        /// <summary>
        /// 注册类型[1=会员 2=商家的会员 3=商家]
        /// </summary>
        public int lx { get; set; }

        /// <summary>
        /// 微信ID
        /// </summary>
        [StringLength(50)]
        public string openid { get; set; }

        /// <summary>
        /// 帐号
        /// </summary>
        [Required, MaxLength(50)]
        public string account { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required, MaxLength(50)]
        public string pwd { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        [StringLength(20)]
        public string real_name { get; set; }

        /// <summary>
        /// 身份证号码
        /// </summary>
        [StringLength(20)]
        public string sfz { get; set; }

        /// <summary>
        /// 身份证图片
        /// </summary>
        [StringLength(50)]
        public string sfzpicture { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        [StringLength(11)]
        public string mobile { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public int sex { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        [StringLength(20)]
        public string province { get; set; }
        /// <summary>
        /// 城市
        /// </summary>
        [StringLength(20)]
        public string city { get; set; }
        /// <summary>
        /// 区域
        /// </summary>
        [StringLength(20)]
        public string area { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        [StringLength(100)]
        public string address { get; set; }

        /// <summary>
        /// 注册IP
        /// </summary>
        [StringLength(50)]
        public string ip { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime? date_birth { get; set; }

        /// <summary>
        /// 用户头像
        /// </summary>
        [StringLength(50)]
        public string picture { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [StringLength(20)]
        public string nickname { get; set; }

        /// <summary>
        /// 现金
        /// </summary>
        public decimal rmb { get; set; }

        /// <summary>
        /// 用户权限[1=正常 2=审核中 3=锁定]
        /// </summary>
        [StringLength(50)]
        public string qx { get; set; }

        /// <summary>
        /// 级别[1=初级会员 2=中级会员 3=高级会员]
        /// </summary>
        [StringLength(20)]
        public string grade { get; set; }

        /// <summary>
        /// 收款二维码
        /// </summary>
        [StringLength(50)]
        public string ewm { get; set; }

        /// <summary>
        /// 开户行
        /// </summary>
        [StringLength(50)]
        public string khh { get; set; }

        /// <summary>
        /// 开户名
        /// </summary>
        [StringLength(50)]
        public string khm { get; set; }

        /// <summary>
        /// 帐号
        /// </summary>
        [StringLength(50)]
        public string kahao { get; set; }

        /// <summary>
        /// 最后登录标识
        /// </summary>
        [StringLength(50)]
        public string loginid { get; set; }

        /// <summary>
        /// 会员人数
        /// </summary>
        public int number { get; set; }

        /// <summary>
        /// 折扣
        /// </summary>
        public decimal zk { get; set; }

        /// <summary>
        /// 用户备注
        /// </summary>
        [StringLength(2000)]
        public string explain { get; set; }
    }
}
